package com.sk.bilibili.handler.numHandler;

import com.sk.bilibili.bean.Member;
import com.sk.bilibili.bean.VideoSet;
import org.springframework.stereotype.Component;

/**
 * @author 邵康
 * @date 2021/12/19 13:04
 */
@Component
public class MemberNumHandler extends BaseNumHandler<Member>{

    @Override
    public void postHandle(Member data) {
        data.setExperience(data.getExperience()+redisUtils.getNum(data,"experience"));
        data.setFansNum(data.getFansNum()+redisUtils.getNum(data,"fansNum"));
    }

    @Override
    public void beforeHandle(Member data) {
        redisUtils.clearNum(data,"experience","fansNum");
    }

}
